import traceback

import pymysql


class DBUtui:
    @staticmethod
    def getconnect():
        try :
            db=pymysql.connect('localhost','root','123456','for04')
        except  Exception as e:
            traceback.print_exc()
        return db
    @staticmethod
    def close(cursor,db):
        if cursor!=None:
            cursor.close()
        if db!=None:
            db.close()

